Add textFieldContentPadding modifier for compact text fields#470
Conversation
Adds a textFieldContentPadding(_:) View modifier (plus a bridged variant) that overrides the OutlinedTextField content padding. When set, TextField renders via BasicTextField + OutlinedTextFieldDefaults.DecorationBox so the padding — and therefore the field height — is honored; the default OutlinedTextField rendering path is unchanged.
|
@marcprux ready for review |
|
Do you happen to have a screenshot of how this looks? |
|
I do not, I tested it locally with skip-fuse-ui the default padding was gone |
|
@marcprux is a screenshot blocking the acceptance of this improvement? |
|
No, sorry, I just hadn't gotten back to it. I'll merge it now and cut a new release. Thanks for the contribution! |
marcprux
left a comment
There was a problem hiding this comment.
Where's the actual View.textFieldContentPadding() implementation? I see the var _textFieldContentPadding: EdgeInsets? modifier, but no way to actually set this value (either directly in transpiled code, or via the bridged invocation in https://github.com/skiptools/skip-fuse-ui/pull/126/changes).
Maybe I misunderstand what your question is, but the PR 126 has the implementation to use the modifier implemented in this repo. |
|
What I mean is, there should also be a way to activate this modifier for transpiled Skip Lite projects, which should (generally) have feature parity with the native Skip Fuse APIs. |
|
Added SkipLite implementation |
Adds a textFieldContentPadding(_:) View modifier (plus a bridged variant) that overrides the OutlinedTextField content padding. When set, TextField renders via BasicTextField + OutlinedTextFieldDefaults.DecorationBox so the padding — and therefore the field height — is honored; the default OutlinedTextField rendering path is unchanged.
Thank you for contributing to the Skip project! Please review the contribution guide at https://skip.dev/docs/contributing/ for advice and guidance on making high-quality PRs.
Use this space to describe your change and add any labels (bug, enhancement, documentation, etc.) to help categorize your contribution.
Skip Pull Request Checklist:
swift testskip-fuse-ai will also get a pr